﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Hjp.FrameWork.Common;

namespace Wjtour.Web.Admin
{
    public partial class loginout : BasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (CurrentUser != null)
            {
                Wjtour.Domain.adminlog log = new Domain.adminlog();
                log.admin_name = CurrentUser.adminname;
                log.done = "loginout";
                log.ip = Utils.GetRealIP();
                log.mod = "login";
                log.addtime = DateTime.Now;
                new Wjtour.BLL.adminlog_bll().Save(log);

                Session["CurrentUser"] = null;
                Session.Clear();
                Response.Redirect("Login.aspx");
            }
        }
    }
}